function documentPreviewCtrl($scope, $http, $stateParams) {
  'ngInject';
  this.id = $stateParams.id;
  this.previewUris = [];
  this.canPreview = true;

  $http.get(`${SERVER_CONTEXT}/api/safesite/workerInfo/review/${this.id}`)
  	.then((resp) => {
  		if (resp.data.code == 'OK') {
  			this.previewUris = resp.data.filePaths;
  		} else {
  			this.canPreview = false;
        layer.alert('文件无法预览或正在转编译为预览图片');
  		}
  		console.log(this.previewUris[0]);
  	});
}

export default documentPreviewCtrl;